<script setup>
// 路由-编程式导航，用js跳转
import { useRouter } from 'vue-router'
const router = useRouter();
const login = () => {
    console.log(123)
    // router.push('/')
    router.replace('/')
}
</script>
<template>
    <router-link to="/">返回首页</router-link>
    <div>
        <input type="text">
    </div>
    <div>
        <input type="password">
    </div>
    <button @click="login">登录</button>
</template>